#pragma once
#include "BaseServer.h"
#include "Singleton.h"
#include "Noncopyable.h"
#include "DBConnectPool.h"
#include "LogicSession.h"
class DBServer:
	public Singleton<DBServer>,
	public Noncopyable,
	public BaseServer
{
public:
	DBServer();
	~DBServer();

	bool ServerInit(const std::string& _path);
	void ServerStart()override;
	void ServerStop() override;

	std::shared_ptr<LogicSession> GetLogicSessionPtr()
	{
		return m_logicsession;
	}
private:

	void TestDoSql();
	static void ExitSingle();

private:
	DBConnectPool m_sqlConPool;
	std::shared_ptr<LogicSession> m_logicsession;
};